package com.foreknow.demo8;

public class B extends A{

    @Override
    public void m1() {
        System.out.println("m1---------");
    }

    @Override
    public void m2(){
        System.out.println("m2----------");
    }

    public void m3(A a){
        a.m1();
    }

    public A m4(){
        A b = new B();
//        System.out.println("m4------------");
        return b;
    }

    public static void main(String[] args) {
        B b = new B();
        b.m1();
        b.m2();
        b.m3();
        b.m4();

    }

}
